package com.game.cards.spells;

import java.util.Scanner;

import com.game.cards.MonsterCard;
import com.game.cards.SpellCard;
import com.game.play.Game;

public class IronSword extends SpellCard{
	
	public IronSword(){
		
		this.title = "Iron Sword";
		this.description = "Raise ATK and DEF by 300 on selected monster";
		
	
	}
	
	public void effect(Game game){
		
		int count = 0;
		System.out.println("Please choose a monster to equip Iron Sword");
		for(MonsterCard c : game.getCurrentTurn().getField().getMonsterCards())
		{
			System.out.println("("+count+")"+ c.getTitle());
			count++;
		}
		
		Scanner scanner = new Scanner(System.in);
		int choice = scanner.nextInt();
		MonsterCard t = game.getCurrentTurn().getField().getMonsterCards().get(choice);
		
		t.setAttack(t.getAttack() + 300);
		t.setDefense(t.getDefense() + 300);
		
		System.out.println(t.getTitle()+" increase attack and defense by 300");
		this.deck.getOwner().getField().removeSpellTrapById(this.id);
		
	}

}
